<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of owner
 *
 * @author wilson
 */
class Owner extends AppModel {

    //put your code here
    var $name = "Owner";
    var $actsAs = array('Logable' => array(
            'userModel' => 'User',
            'userKey' => 'user_id',
            'change' => 'full', // options are 'list' or 'full'
            'description_ids' => TRUE // options are TRUE or FALSE
            ));
    var $belongsTo = array(
        'Property' => array(
            'model' => 'Property'
        )
    );
    var $hasMany = array(
        'OwnerReview' => array(
            'model' => 'OwnerReview'
        )
    );
    var $validate = array(
        'nombres' => array(
            'notEmpty' => array(
                'rule' => 'notEmpty',
                'message' => 'Este campo no puede estar en blanco'
            ),
        ),
        'primer_apellido' => array(
            'notEmpty' => array(
                'rule' => 'notEmpty',
                'message' => 'Este campo no puede estar en blanco'
            ),
        ),
        'documento' => array(
            'notEmpty' => array(
                'rule' => 'notEmpty',
                'message' => 'Este campo no puede estar en blanco'
            ),
        )
    );

}

?>
